var job = [
    {
        type:"投资拓展类",
        jobname:"投资拓展岗",
        addr:"上海、武汉、广州、大连",
        major:"建筑学/金融学/经济/工商管理等相关专业",
        link:""
    },{
        type:"设计类",
        jobname:"建筑设计岗",
        addr:"上海、武汉、广州",
        major:"建筑学等相关专业",
        link:""
    },{
        type:"工程管理类",
        jobname:"机电工程岗",
        addr:"上海",
        major:"机电一体化等相关专业",
        link:""
    },{
        type:"工程管理类",
        jobname:"工程管理岗",
        addr:"西安",
        major:"土木工程/工民建等相关专业",
        link:""
    },{
        type:"成本招采类",
        jobname:"商务分析岗",
        addr:"上海",
        major:"工程造价等相关专业",
        link:""
    },{
        type:"成本招采类",
        jobname:"招标采购岗",
        addr:"上海",
        major:"土木工程/材料学等相关专业",
        link:""
    },{
        type:"成本招采类",
        jobname:"造价管理岗",
        addr:"上海、武汉、广州、大连",
        major:"土木工程/工程造价等相关专业",
        link:""
    },{
        type:"营销管理类",
        jobname:"品牌管理岗",
        addr:"上海",
        major:"广告/传播/广电/数媒等相关专业",
        link:""
    },{
        type:"营销管理类",
        jobname:"市场研究岗",
        addr:"上海",
        major:"市场营销/经济学等相关专业",
        link:""
    },{
        type:"营销管理类",
        jobname:"销售管理岗",
        addr:"上海",
        major:"市场营销/管理学/经济学等相关专业",
        link:""
    },{
        type:"营销管理类",
        jobname:"客服管理岗",
        addr:"上海",
        major:"公共关系/管理学/市场营销等相关专业",
        link:""
    },{
        type:"商业管理类",
        jobname:"招商管理岗",
        addr:"上海",
        major:"市场营销/工商管理等相关专业",
        link:""
    },{
        type:"财务管理类",
        jobname:"财务管理岗",
        addr:"上海、大连",
        major:"财务管理/会计/金融等相关专业",
        link:""
    },{
        type:"财务管理类",
        jobname:"会计岗",
        addr:"武汉、广州",
        major:"财务管理/会计/金融等相关专业",
        link:""
    },{
        type:"运营管理类",
        jobname:"运营管理岗",
        addr:"上海、大连",
        major:"土木工程/财务管理等相关专业",
        link:""
    },{
        type:"运营管理类",
        jobname:"信息化管理岗",
        addr:"上海",
        major:"计算机等相关专业",
        link:""
    },{
        type:"人力资源类",
        jobname:"人力资源岗",
        addr:"上海、广州",
        major:"人力资源管理等相关专业",
        link:""
    },{
        type:"法务类",
        jobname:"法务管理岗",
        addr:"上海",
        major:"法学等相关专业",
        link:""
    }
];


var jobinfo = "";
var jobtype = "!!(>.<)!!不想加班!!(>.<)!!";
for (var i in job){
    if (jobtype!==job[i].type){
        jobtype=job[i].type;
        jobinfo+=
            "<div class=\"col-xs-12 mtb\">\n" +
            "    <div class=\"col-xs-12 jobtype\">"+job[i].type+"</div>\n" +
            "</div>\n" +
            "<div class=\"col-xs-12 mtb1\">\n" +
            "     <div class=\"jobname\">\n" +
            "           <p><span class=\"name\">"+job[i].jobname+"</span><span class=\"singal\">▶</span></p>\n" +
            "      </div>\n" +
            "       <div class=\"jobinfo\">\n" +
            "           <p>工作地点:"+job[i].addr+"</p>\n" +
            "           <p>专业:"+job[i].major+"</p>\n" +
            "           <p><a href='"+job[i].link+"' target='_blank'><span class=\"apply_link\">立即申请</span></a></p>\n" +
            "       </div>\n" +
            "</div>"
    }else {
        jobinfo+="<div class=\"col-xs-12 mtb1\">\n" +
            "     <div class=\"jobname\">\n" +
            "           <p><span class=\"name\">"+job[i].jobname+"</span><span class=\"singal\">▶</span></p>\n" +
            "      </div>\n" +
            "       <div class=\"jobinfo\">\n" +
            "           <p>工作地点:"+job[i].addr+"</p>\n" +
            "           <p>专业:"+job[i].major+"</p>\n" +
            "           <p><a href='"+job[i].link+"' target='_blank'><span class=\"apply_link\">立即申请</span></a></p>\n" +
            "       </div>\n" +
            "</div>"
    }
}
// console.log(jobinfo,"职位");
// $(".job_content").html(jobinfo);
//0.0
// $(".jobname").click(function () {
//    var _this_singal = $(this).find(".singal");
//    _this_singal.text() === "▶" ? _this_singal.text("▼") : _this_singal.text("▶");
//    $(this).next(".jobinfo").slideToggle();
// });
